import { http } from "@/utils/http";
import { downloadFile } from "../file"
import { exportFile } from "../export";
import { baseUrlApi } from "@/api/utils";
export const getAllList = params => {
  return http.request("get", "/business/average-user-import", params);
};
//签约灵工列表
export function getPageList(params) {
  return http.request("get", baseUrlApi("business/average_user_import/list"), { params });
}

export const submitData = (params: any) => {
  return http.request(params.id ? "put" : "post", `/business/average-user-import/${params.id ?? ""}`, {
    data: params
  });
};

export const getSingle = (id: number) => {
  return http.request("get", `/business/average-user-import/${id}`);
};

export const deleteData = (id: number) => {
  return http.request("delete", `/business/average-user-import/${id}`);
};

export const download = (id) => {
  downloadFile(`/business/average-user-import/${id}/download`);
}

export function exportData(id) {
  exportFile(`/business/average-user-import/${id}/export`);
}